package collectiondemo;

public class MainDemo7 {
    public static void main(String[] args) {
        java.util.List list = java.util.Arrays.asList("one Two three Four five six one three Four".split(" "));
        System.out.println("List :" + list);
        java.util.List sublist = java.util.Arrays.asList("three Four".split(" "));
        System.out.println("子列表 :" + sublist);
        System.out.println("indexOfSubList: " + java.util.Collections.indexOfSubList(list, sublist));
        System.out.println("lastIndexOfSubList: " + java.util.Collections.lastIndexOfSubList(list, sublist));
    }
}
